import request from '@/utils/request';
import { AxiosPromise } from 'axios';

import {EnterpriseTypeQuery,EnterpriseTypePageResult,EnterpriseType} from'@/api/occupant/enterprise/types'

/**
 * 下单端-企业用户查询
 * @param queryParams 
 */
export function casualEntrepreneurPages(queryParams: EnterpriseTypeQuery): AxiosPromise<EnterpriseTypePageResult> {
  return request({
    url: '/web/casualEntrepreneur/pages',
    method: 'get',
    params:queryParams
  });
}
/**
 * 下单端-企业用户新增
 * @param queryParams 
 */
export function casualPersonageAdd(queryParams: EnterpriseType){
  return request({
    url: '/web/casualEntrepreneur/add',
    method: 'post',
    data: queryParams,
  });
}
/**
 * 下单端-企业用户修改
 * @param queryParams 
 */
export function casualEntrepreneurEdit(queryParams: EnterpriseType){
  return request({
    url: '/web/casualEntrepreneur/edit', 
    method: 'post',
    data: queryParams,
  });
}
/**
 * 下单端-企业用户删除
 * @param queryParams 
 */
export function casualEntrepreneurDel(id: number|string){
  return request({
    url: '/web/casualEntrepreneur/del?id='+id,
    method: 'get',
  });
}
/**
 * 下单端-企业下拉框
 * @param queryParams 
 */
export function casualEntrepreneurOptions(): AxiosPromise<OptionType[]> {
  return request({
    url: '/web/casualEntrepreneur/options',
    method: 'get',
  });
}